<%--
  Created by IntelliJ IDEA.
  User: chenqi
  Date: 2021/5/13
  Time: 10:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <title>Title</title>

</head>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/jquery-1.12.4.js"></script>
<script type="text/javascript">
    $(function () {
        $("#myForm").submit(function () {
           var uPhone=$("[name='uPhone']").val();
            var uPassword=$("[name='uPassword']").val();
            var reUPassword=$("[name='reUPassword']").val();
            var reg= /^1[3|4|5|7|8][0-9]{9}$/;
            if (uPhone== ""){
               $("#span1").html("手机号不能为空!");
               return false;
            } else if(!reg.test(uPhone)){
                $("#span1").html("手机号格式不正确!");
                return false;
            }else if (uPassword==""){
                $("#span2").html("密码不能为空");
                return false;
            }else if (reUPassword=="") {
                $("#span3").html("密码不能为空");

                return false;
            }
            else if (uPassword!=reUPassword){
                $("#span3").html("两次密码不一致");
                return false;
            }
            return true;
        });
    });
</script>
<style type="text/css">
    body{
        background:url("${pageContext.request.contextPath}/statics/img/update.jpg");
        background-size:100% 100%;
    }
    *{
        margin: 0px;
        padding: 0px;
    }

    #father{
        position: relative;
    }
    #father #one{
        position:absolute;
        left: 1200px;
        top: 450px;

    }
    #father #one td{
        height: 50px;
        line-height: 50px;

    }
    #father #one input{
        height:30px;
        width: 200px;
    }
    #father #one .html{
          font-size: 20px;
        font-weight: bold;
      }
    #father #one .btn{
        width: 50px;
        height: 30px;
        margin-left: 60px;
    }
    #father #two{
        position: absolute;
        margin-left: 1240px;
        margin-top: 350px;
        font-size: 30px;
    }
    #father #one .btn{
        width: 100px;
        height: 35px;
        font-size: 20px;
        border-radius:7px ;
        margin-top: 40px;
    }

</style>
<body>
<div id="father">
    <div id="two"><h1>修改密码</h1></div>
<div id="one">
<form action="${pageContext.request.contextPath}/xiuGai" method="post" id="myForm">
    <table cellpadding="0" cellspacing="0" width="600px" border="0">

        <tr>
            <td><span class="html">手机号码&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" name="uPhone"><span id="span1" style="color:red;font-weight: bolder;font-size: 20px"></span></td>

        </tr>
        <tr>
            <td><span class="html">新的密码&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="password" name="uPassword"><span id="span2" style="color: red;font-weight: bolder;font-size: 20px"></span></td>

        </tr>
        <tr>
            <td><span class="html">确认密码&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="password" name="reUPassword"><span id="span3" style="color: red;font-weight: bolder;font-size: 20px"></span></td>

        </tr>
        <tr>
            <td><input type="submit" value="提交" class="btn"><input type="reset" value="清空" class="btn"></td>
        </tr>

    </table>
</form>
</div>

</div>
</body>
</html>
